home *** CD-ROM | disk | FTP | other *** search
-
-
-
- EXIT(3) MINTLIB LIBRARY FUNCTIONS EXIT(3)
-
-
- N✓NA✓AM✓ME✓E
- exit, _exit - terminate process
-
- S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
- #include <stdlib.h>
-
- void exit(int status);
-
- #include <unistd.h>
-
- void _exit(int status);
-
- D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
- exit terminates the calling process in the following way:
- - All registered exit handlers are called (see atexit).
- - Standard input, standard output, and standard error
- output are flushed.
- - All other open file descriptors are closed
- - _exit is called with the argument passed to exit.
-
- Returning from main() with a value is identical to calling
- exit with the same value.
-
- _exit terminates the calling process without cleanup
- action:
- - If profiling is active, profiling will be ended
- and the results will be written out to file.
- - Pterm is called with the argument passed to _exit.
-
- S✓SE✓EE✓E A✓AL✓LS✓SO✓O
- a✓at✓te✓ex✓xi✓it✓t(✓(3✓3)✓),✓, P✓Pt✓te✓er✓rm✓m(✓(2✓2)✓),✓, w✓wa✓ai✓it✓t(✓(3✓3)✓)
-
- N✓NO✓OT✓TE✓ES✓S
- The argument to exit is returned as the return code to the
- calling program. Zero should be returned on success, non-
- zero should be returned on failure or abnormal termina-
- tion.
-
- The Operating System does many things on process termina-
- tion not mentioned above. For instance, memory is freed,
- the parent process is signalled, file locks are released
- and so on.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MiNT docs 0.1 3 March 1993 1
-
-
-